
{% if newwins %}
    <!-- 启动弹出层 { -->
    <div id="hd_pop">
        <h2 class="blind">弹出层通知</h2>
        {% for newwin in newwins %}
            <div id="hd_pops_{{ newwin.nw_id }}" class="hd_pops" style="top:{{ newwin.nw_top }}px;left:{{ newwin.nw_left }}px">
                <div class="hd_pops_con" style="width:{{ newwin.nw_width }}px;height:{{ newwin.nw_height }}px">
                    {{ newwin.nw_content|safe }}
                </div>
                <div class="hd_pops_footer">
                    <button class="hd_pops_reject hd_pops_{{ newwin.nw_id }} {{ newwin.nw_disable_hours }}">
                        <strong>{{ newwin.nw_disable_hours }}</strong>不要重新看几个小时.
                    </button>
                    <button class="hd_pops_close hd_pops_{{ newwin.nw_id }}">
                        关闭 <i class="fa fa-xmark" aria-hidden="true"></i>
                    </button>
                </div>
            </div>
        {% else %}
            <span class="blind">无弹出层通知.</span>
        {% endfor %}
    </div>
    <script>
        $(function() {
            $(".hd_pops_reject").click(function() {
                var id = $(this).attr('class').split(' ');
                var ck_name = id[1];
                var exp_time = parseInt(id[2]);
                $("#"+id[1]).css("display", "none");
                set_cookie(ck_name, 1, exp_time, g6_cookie_domain);
            });
            $('.hd_pops_close').click(function() {
                var idb = $(this).attr('class').split(' ');
                $('#'+idb[1]).css('display','none');
            });
            $("#hd").css("z-index", 1000);
        });
    </script>
    <!-- } 弹出层的结尾 -->
{% endif %}